package com.javen.mdc.springbootmdc.config;

import com.javen.mdc.springbootmdc.aop.LogInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description: com.javen.mdc.springbootmdc.config
 * @Author: tujw@netinnet.cn
 * @Date: 2022/12/28 10:34
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LogInterceptor()).
//                excludePathPatterns("/hello").
                addPathPatterns("/**");
    }
}
